<?php

//require forms file


//require objects file
require_once ROOT_APPLICATION_MODULES_DEFAULT_OBJECTS.DS."Page.php";

//require models file
require_once ROOT_APPLICATION_MODULES_DEFAULT_MODELS.DS."Pages.php";


class PageController extends Zend_Controller_Action
{
    public function init()
    {
    	
    }
    
    public function indexAction()
    {
//        $page_id = $this->_getParam('id');
//        if(!isset($page_id))
//        {
//            
//        }
//        die();
        $modelPage = new End_Models_Pages();
        $page = $modelPage->fetchAll();
        $this->view->Pages = $page;
    }
    
    public function detailAction()
    {
        $param = $this->getRequest()->getParams();

        $modelPage = new End_Models_Pages();
        $page = $modelPage->_find($param['page_id']); 
        $this->view->Page = $page; 
    }
}







